package com.mlearning.demo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Mapper
@Repository
public interface TreeMapper {
    ArrayList<String> getMyTrees(@Param("id") int userid);
    ArrayList<String> getTreeMastered(@Param("id") int userid); //获取在Tree上已掌握的知识，为前端做区分
    int delMastered(@Param("id") int userid,@Param("know") String know);
    int addMastered(@Param("id") int userid,@Param("know") String know,@Param("timestamp") long timestamp);
    int delMyKnowledge(@Param("id") int userid,@Param("tree") int tree,@Param("no") int no);
    int addMyKnowledge(@Param("id") int userid,@Param("know") String know,@Param("tree") int tree,@Param("no") int no,@Param("timestamp") long timestamp);
    int updateTreeNo(@Param("id") int userid,@Param("tree") int tree);
    int updateKnowledgeNo(@Param("id") int userid,@Param("tree") int tree,@Param("no") int no);
}
